<!-- HTML header for doxygen 1.8.3.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<title>Nordic Thingy:52 v2.2.0 : drv_hts221.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra_stylesheet_offline.css" rel="stylesheet" type="text/css"/>
<link href="nordic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" width="100%" class="blank">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Nordic Semiconductor" src="nordic_small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">Nordic Thingy:52 v2.2.0
   </div>
  </td>
 </tr>
 </tbody>
</table>
<script>
var url=window.location.href.split("/").reverse()[1];
var validLinks= ["nrf5","s130","s132","s212","s332"];
var index;
for (index = 0; index < validLinks.length; ++index) {
   if ( url.indexOf(validLinks[index]) !== -1 ) {
      document.getElementById(validLinks[index]).setAttribute('class', 'doclinks docselected');
   };
};
</script>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('drv__hts221_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">drv_hts221.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">  Copyright (c) 2010 - 2017, Nordic Semiconductor ASA</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">  All rights reserved.</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">  Redistribution and use in source and binary forms, with or without modification,</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">  are permitted provided that the following conditions are met:</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">  1. Redistributions of source code must retain the above copyright notice, this</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">     list of conditions and the following disclaimer.</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">  2. Redistributions in binary form, except as embedded into a Nordic</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">     Semiconductor ASA integrated circuit in a product or a software update for</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">     such product, must reproduce the above copyright notice, this list of</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">     conditions and the following disclaimer in the documentation and/or other</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">     materials provided with the distribution.</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">  3. Neither the name of Nordic Semiconductor ASA nor the names of its</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">     contributors may be used to endorse or promote products derived from this</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">     software without specific prior written permission.</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">  4. This software, with or without modification, must only be used with a</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">     Nordic Semiconductor ASA integrated circuit.</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment">  5. Any software provided in binary form under this license must not be reverse</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment">     engineered, decompiled, modified and/or disassembled.</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment">  THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA &quot;AS IS&quot; AND ANY EXPRESS</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment">  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="comment">  OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="comment">  DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment">  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="comment">  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="comment">  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="comment">  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="comment">  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="comment">  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="preprocessor">#ifndef __DRV_HTS221_H__</span></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="preprocessor">#define __DRV_HTS221_H__</span></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="preprocessor">#include &quot;nrf_drv_twi.h&quot;</span></div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="group__hts221__humidity__driver.html#ga7e23ffa5bb718d06bcee89bbdf844ed8">   55</a></span>&#160;<span class="preprocessor">#define WHO_AM_I_REG                         0x0F</span></div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="preprocessor">#define WHO_AM_I_VAL                         0xBC</span></div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="group__hts221__humidity__driver.html#ga435c4cef8f7aedadecf8f8ed93cae28a">   59</a></span>&#160;<span class="preprocessor">#define AV_CONF_REG                          0x10</span></div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="preprocessor">#define AV_CONF_REG_DEFAULT                  0x1B</span></div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="group__hts221__humidity__driver.html#ga31c98f3b85eb9f0f72de2b0c84033290">   63</a></span>&#160;<span class="preprocessor">#define AV_CONF_REG_AVGT_Pos                 3</span></div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="preprocessor">#define AV_CONF_REG_AVGT_Msk                (7 &lt;&lt; AV_CONF_REG_AVGT_Pos)</span></div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="preprocessor">#define AV_CONF_REG_AVGT_2                   0</span></div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="preprocessor">#define AV_CONF_REG_AVGT_4                   1</span></div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="preprocessor">#define AV_CONF_REG_AVGT_8                   2</span></div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="preprocessor">#define AV_CONF_REG_AVGT_16                  3</span></div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="preprocessor">#define AV_CONF_REG_AVGT_32                  4</span></div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="preprocessor">#define AV_CONF_REG_AVGT_64                  5</span></div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="preprocessor">#define AV_CONF_REG_AVGT_128                 6</span></div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="preprocessor">#define AV_CONF_REG_AVGT_256                 7</span></div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div><div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="group__hts221__humidity__driver.html#ga231dcf078125964af699b9570125fbab">   75</a></span>&#160;<span class="preprocessor">#define AV_CONF_REG_AVGH_Pos                 0</span></div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="preprocessor">#define AV_CONF_REG_AVGH_Msk                (7 &lt;&lt; AV_CONF_REG_AVGH_Pos)</span></div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="preprocessor">#define AV_CONF_REG_AVGH_4                   0</span></div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<span class="preprocessor">#define AV_CONF_REG_AVGH_8                   1</span></div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="preprocessor">#define AV_CONF_REG_AVGH_16                  2</span></div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="preprocessor">#define AV_CONF_REG_AVGH_32                  3</span></div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="preprocessor">#define AV_CONF_REG_AVGH_64                  4</span></div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="preprocessor">#define AV_CONF_REG_AVGH_128                 5</span></div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="preprocessor">#define AV_CONF_REG_AVGH_256                 6</span></div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="preprocessor">#define AV_CONF_REG_AVGH_512                 7</span></div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="group__hts221__humidity__driver.html#gabd83ea49367ca7850ffc9091890aa46b">   87</a></span>&#160;<span class="preprocessor">#define CTRL_REG1                            0x20</span></div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="preprocessor">#define CTRL_REG1_DEFAULT                    0x00</span></div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="group__hts221__humidity__driver.html#ga1fd0afdeb4ae37dd08267d840b97ab9d">   91</a></span>&#160;<span class="preprocessor">#define CTRL_REG1_PD_Pos                     7</span></div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;<span class="preprocessor">#define CTRL_REG1_PD_Msk                    (1 &lt;&lt; CTRL_REG1_PD_Pos)</span></div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;<span class="preprocessor">#define CTRL_REG1_PD_PowerDown               0</span></div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;<span class="preprocessor">#define CTRL_REG1_PD_Active                  1</span></div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="group__hts221__humidity__driver.html#ga3a0fe3acef8e54f887482867d254e058">   97</a></span>&#160;<span class="preprocessor">#define CTRL_REG1_BDU_Pos                    2</span></div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;<span class="preprocessor">#define CTRL_REG1_BDU_Msk                   (1 &lt;&lt; CTRL_REG1_BDU_Pos)</span></div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;<span class="preprocessor">#define CTRL_REG1_BDU_Continuous             0</span></div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;<span class="preprocessor">#define CTRL_REG1_BDU_Set                    1</span></div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="group__hts221__humidity__driver.html#ga372204bcf096258d30118bc75a917816">  103</a></span>&#160;<span class="preprocessor">#define CTRL_REG1_ODR_Pos                    0</span></div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;<span class="preprocessor">#define CTRL_REG1_ODR_Msk                   (3 &lt;&lt; CTRL_REG1_ODR_Pos)</span></div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;<span class="preprocessor">#define CTRL_REG1_ODR_OneShot                0</span></div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;<span class="preprocessor">#define CTRL_REG1_ODR_1Hz                    1</span></div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;<span class="preprocessor">#define CTRL_REG1_ODR_7Hz                    2</span></div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;<span class="preprocessor">#define CTRL_REG1_ODR_12_5Hz                 3</span></div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;</div><div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="group__hts221__humidity__driver.html#gafd5ce55297b11bfc3c750a359b80de46">  111</a></span>&#160;<span class="preprocessor">#define CTRL_REG2                            0x21</span></div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;<span class="preprocessor">#define CTRL_REG2_DEFAULT                    0x00</span></div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div><div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="group__hts221__humidity__driver.html#ga5fc2b9fb8c84b95178ec224a351d631c">  115</a></span>&#160;<span class="preprocessor">#define CTRL_REG2_BOOT_Pos                   7</span></div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;<span class="preprocessor">#define CTRL_REG2_BOOT_Msk                  (1 &lt;&lt; CTRL_REG2_BOOT_Pos)</span></div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;<span class="preprocessor">#define CTRL_REG2_BOOT_Normal                0</span></div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;<span class="preprocessor">#define CTRL_REG2_BOOT_Reboot                1</span></div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="group__hts221__humidity__driver.html#ga027dad92a274a31acf8576d253e5119a">  121</a></span>&#160;<span class="preprocessor">#define CTRL_REG2_HEATER_Pos                 1</span></div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<span class="preprocessor">#define CTRL_REG2_HEATER_Msk                (1 &lt;&lt; CTRL_REG2_HEATER_Pos)</span></div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;<span class="preprocessor">#define CTRL_REG2_HEATER_Disable             0</span></div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;<span class="preprocessor">#define CTRL_REG2_HEATER_Enable              1</span></div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="group__hts221__humidity__driver.html#gae8a1408784cdcc0f6729303cafe2f8f8">  127</a></span>&#160;<span class="preprocessor">#define CTRL_REG2_ONE_SHOT_Pos               0</span></div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;<span class="preprocessor">#define CTRL_REG2_ONE_SHOT_Msk              (1 &lt;&lt; CTRL_REG2_ONE_SHOT_Pos)</span></div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;<span class="preprocessor">#define CTRL_REG2_ONE_SHOT_WaitingForStart   0</span></div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;<span class="preprocessor">#define CTRL_REG2_ONE_SHOT_Start             1</span></div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;</div><div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="group__hts221__humidity__driver.html#gacdb673970b82f2380da68c9e8d1dc5c6">  133</a></span>&#160;<span class="preprocessor">#define CTRL_REG3                            0x22</span></div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;<span class="preprocessor">#define CTRL_REG3_DEFAULT                    0x00</span></div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="group__hts221__humidity__driver.html#ga1eb6fa950b0e4e12d8345b06ce0aa910">  137</a></span>&#160;<span class="preprocessor">#define CTRL_REG3_DRDY_H_L_Pos               7</span></div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;<span class="preprocessor">#define CTRL_REG3_DRDY_H_L_Msk              (1 &lt;&lt; CTRL_REG3_DRDY_H_L_Pos)</span></div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;<span class="preprocessor">#define CTRL_REG3_DRDY_H_L_ActiveHigh        0</span></div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;<span class="preprocessor">#define CTRL_REG3_DRDY_H_L_ActiveLow         1</span></div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;</div><div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="group__hts221__humidity__driver.html#gaebb705c182edc13f6eec7b05353f1f13">  143</a></span>&#160;<span class="preprocessor">#define CTRL_REG3_PP_OD_Pos                  6</span></div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;<span class="preprocessor">#define CTRL_REG3_PP_OD_Msk                 (1 &lt;&lt; CTRL_REG3_PP_OD_Pos)</span></div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;<span class="preprocessor">#define CTRL_REG3_PP_OD_PushPull             0</span></div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;<span class="preprocessor">#define CTRL_REG3_PP_OD_OpenDrain            1</span></div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;</div><div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="group__hts221__humidity__driver.html#ga36d45b8f02164e7178681ed9b246c25f">  149</a></span>&#160;<span class="preprocessor">#define CTRL_REG3_DRDY_Pos                   2</span></div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;<span class="preprocessor">#define CTRL_REG3_DRDY_Msk                  (1 &lt;&lt; CTRL_REG3_DRDY_Pos)</span></div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;<span class="preprocessor">#define CTRL_REG3_DRDY_Disable               0</span></div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;<span class="preprocessor">#define CTRL_REG3_DRDY_Enable                1</span></div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="group__hts221__humidity__driver.html#ga1f7e79cfe81dc06414550fa52418941e">  155</a></span>&#160;<span class="preprocessor">#define STATUS_REG                           0x27</span></div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div><div class="line"><a name="l00158"></a><span class="lineno"><a class="line" href="group__hts221__humidity__driver.html#gad0dc98788ad234c5b6f927423cf8b826">  158</a></span>&#160;<span class="preprocessor">#define STATUS_REG_H_DA_Pos                  1</span></div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;<span class="preprocessor">#define STATUS_REG_H_DA_Msk                 (1 &lt;&lt; STATUS_REG_H_DA_Pos)</span></div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;<span class="preprocessor">#define STATUS_REG_H_DA_NotAvail             0</span></div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;<span class="preprocessor">#define STATUS_REG_H_DA_Avail                1</span></div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;</div><div class="line"><a name="l00164"></a><span class="lineno"><a class="line" href="group__hts221__humidity__driver.html#gacce94f24830abe43b586dc887f7cdf81">  164</a></span>&#160;<span class="preprocessor">#define STATUS_REG_T_DA_Pos                  0</span></div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;<span class="preprocessor">#define STATUS_REG_T_DA_Msk                 (1 &lt;&lt; STATUS_REG_T_DA_Pos)</span></div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;<span class="preprocessor">#define STATUS_REG_T_DA_NotAvail             0</span></div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;<span class="preprocessor">#define STATUS_REG_T_DA_Avail                1</span></div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno"><a class="line" href="group__hts221__humidity__driver.html#ga7c074c73db14140849716ae07ddda02f">  170</a></span>&#160;<span class="preprocessor">#define HUMIDITY_OUT_L_REG                   0x28</span></div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;</div><div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="group__hts221__humidity__driver.html#gafe72e301809c83d1a27b0888fe014f66">  173</a></span>&#160;<span class="preprocessor">#define HUMIDITY_OUT_H_REG                   0x29</span></div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;</div><div class="line"><a name="l00176"></a><span class="lineno"><a class="line" href="group__hts221__humidity__driver.html#ga05f19eb76051170c4c95538a11982189">  176</a></span>&#160;<span class="preprocessor">#define TEMP_OUT_L_REG                       0x2A</span></div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;</div><div class="line"><a name="l00179"></a><span class="lineno"><a class="line" href="group__hts221__humidity__driver.html#gaff3d1ca89fdcdfd99fe28f579b79a041">  179</a></span>&#160;<span class="preprocessor">#define TEMP_OUT_H_REG                       0x2B</span></div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;<span class="preprocessor">#define CALIBRATION_REGS                     0x30</span></div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;<span class="preprocessor">#define CALIBRATION_REGS_NUM                 16</span></div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;</div><div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="structdrv__hts221__cfg__t.html">  186</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;{</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    uint8_t  av_conf;</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    uint8_t  ctrl_reg1;</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    uint8_t  ctrl_reg2;</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    uint8_t  ctrl_reg3;</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;}<a class="code" href="structdrv__hts221__cfg__t.html">drv_hts221_cfg_t</a>;</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;</div><div class="line"><a name="l00196"></a><span class="lineno"><a class="line" href="structdrv__hts221__calib__t.html">  196</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;{</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;    uint8_t  H0_rH_x2;</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;    uint8_t  H1_rH_x2;</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    uint16_t T0_degC_x8;</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;    uint16_t T1_degC_x8;</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;    int16_t  H0_T0_OUT;</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;    int16_t  H1_T0_OUT;</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;    int16_t  T0_OUT;</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    int16_t  T1_OUT;</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;}<a class="code" href="structdrv__hts221__calib__t.html">drv_hts221_calib_t</a>;</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;</div><div class="line"><a name="l00210"></a><span class="lineno"><a class="line" href="structdrv__hts221__twi__cfg__t.html">  210</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;{</div><div class="line"><a name="l00212"></a><span class="lineno"><a class="line" href="structdrv__hts221__twi__cfg__t.html#a8c7253a73c43f1c2208390e53694d672">  212</a></span>&#160;    uint8_t                      <a class="code" href="structdrv__hts221__twi__cfg__t.html#a8c7253a73c43f1c2208390e53694d672">twi_addr</a>;          </div><div class="line"><a name="l00213"></a><span class="lineno"><a class="line" href="structdrv__hts221__twi__cfg__t.html#aa51fd479e3282606a7ece1008de43ea0">  213</a></span>&#160;    uint32_t                     <a class="code" href="structdrv__hts221__twi__cfg__t.html#aa51fd479e3282606a7ece1008de43ea0">pin_int</a>;           </div><div class="line"><a name="l00214"></a><span class="lineno"><a class="line" href="structdrv__hts221__twi__cfg__t.html#aad2f34fbc23f1707a2a924ad692052eb">  214</a></span>&#160;    nrf_drv_twi_t        <span class="keyword">const</span> * <a class="code" href="structdrv__hts221__twi__cfg__t.html#aad2f34fbc23f1707a2a924ad692052eb">p_twi_instance</a>;    </div><div class="line"><a name="l00215"></a><span class="lineno"><a class="line" href="structdrv__hts221__twi__cfg__t.html#a6c34d8d908539157fb1bf9c8a9c7da70">  215</a></span>&#160;    nrf_drv_twi_config_t <span class="keyword">const</span> * <a class="code" href="structdrv__hts221__twi__cfg__t.html#a6c34d8d908539157fb1bf9c8a9c7da70">p_twi_config</a>;      </div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;}<a class="code" href="structdrv__hts221__twi__cfg__t.html">drv_hts221_twi_cfg_t</a>;</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;uint32_t <a class="code" href="group__hts221__humidity__driver.html#gaa2b19972c9fcb84123011a191849af58">drv_hts221_init</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;</div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;uint32_t <a class="code" href="group__hts221__humidity__driver.html#ga24f3e384cf5127e163212310c2b0661a">drv_hts221_open</a>(<a class="code" href="structdrv__hts221__twi__cfg__t.html">drv_hts221_twi_cfg_t</a> <span class="keyword">const</span> * <span class="keyword">const</span> p_cfg);</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;uint32_t <a class="code" href="group__hts221__humidity__driver.html#gaf262aca57c55b678c961d61f548f1e80">drv_hts221_close</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;uint32_t <a class="code" href="group__hts221__humidity__driver.html#ga9e887a67ff3bdc5b98cbe63c7ed06272">drv_hts221_verify</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;uint32_t <a class="code" href="group__hts221__humidity__driver.html#ga14cbe56c4a793aab40d002f3b43c0f91">drv_hts221_cfg_set</a>(<a class="code" href="structdrv__hts221__cfg__t.html">drv_hts221_cfg_t</a> <span class="keyword">const</span> * <span class="keyword">const</span> p_cfg);</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;uint32_t <a class="code" href="group__hts221__humidity__driver.html#ga463f0037f63d665eecdebb775d6b7512">drv_hts221_cfg_get</a>(<a class="code" href="structdrv__hts221__cfg__t.html">drv_hts221_cfg_t</a> *  p_cfg);</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;uint32_t <a class="code" href="group__hts221__humidity__driver.html#gab3a1f7d2ec8dbfa30e72b0ab4477521a">drv_hts221_status_get</a>(uint8_t * p_status);</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;uint32_t <a class="code" href="group__hts221__humidity__driver.html#ga8f62f93e4ed7e7ede87f8ef902f2e125">drv_hts221_calib_get</a>(<a class="code" href="structdrv__hts221__calib__t.html">drv_hts221_calib_t</a> * p_calib);</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;uint32_t <a class="code" href="group__hts221__humidity__driver.html#gad12bb488d720d11e8a7b77d67428911d">drv_hts221_humidity_get</a>(int16_t * p_humidity);</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;uint32_t <a class="code" href="group__hts221__humidity__driver.html#gac83d1b720213d6cdd3313d78a96f4b85">drv_hts221_temperature_get</a>(int16_t * p_temperature);</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;uint32_t <a class="code" href="group__hts221__humidity__driver.html#gaf996ef2e602624d1f203c8ab0bd549b8">drv_hts221_one_shot</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;uint32_t <a class="code" href="group__hts221__humidity__driver.html#gacd7cb33e6115282cecdb0294c22de66b">drv_hts221_reboot</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;</div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;</div><div class="ttc" id="group__hts221__humidity__driver_html_ga14cbe56c4a793aab40d002f3b43c0f91"><div class="ttname"><a href="group__hts221__humidity__driver.html#ga14cbe56c4a793aab40d002f3b43c0f91">drv_hts221_cfg_set</a></div><div class="ttdeci">uint32_t drv_hts221_cfg_set(drv_hts221_cfg_t const *const p_cfg)</div><div class="ttdoc">Function for configuring the HTS221 sensor according to the specified configuration. </div></div>
<div class="ttc" id="group__hts221__humidity__driver_html_ga24f3e384cf5127e163212310c2b0661a"><div class="ttname"><a href="group__hts221__humidity__driver.html#ga24f3e384cf5127e163212310c2b0661a">drv_hts221_open</a></div><div class="ttdeci">uint32_t drv_hts221_open(drv_hts221_twi_cfg_t const *const p_cfg)</div><div class="ttdoc">Function for opening the HTS221 driver according to the specified configuration. </div></div>
<div class="ttc" id="structdrv__hts221__twi__cfg__t_html_aa51fd479e3282606a7ece1008de43ea0"><div class="ttname"><a href="structdrv__hts221__twi__cfg__t.html#aa51fd479e3282606a7ece1008de43ea0">drv_hts221_twi_cfg_t::pin_int</a></div><div class="ttdeci">uint32_t pin_int</div><div class="ttdoc">Interrupt pin. </div><div class="ttdef"><b>Definition:</b> drv_hts221.h:213</div></div>
<div class="ttc" id="group__hts221__humidity__driver_html_ga463f0037f63d665eecdebb775d6b7512"><div class="ttname"><a href="group__hts221__humidity__driver.html#ga463f0037f63d665eecdebb775d6b7512">drv_hts221_cfg_get</a></div><div class="ttdeci">uint32_t drv_hts221_cfg_get(drv_hts221_cfg_t *p_cfg)</div><div class="ttdoc">Function for reading the configuration of the HTS221 sensor. </div></div>
<div class="ttc" id="structdrv__hts221__twi__cfg__t_html_a8c7253a73c43f1c2208390e53694d672"><div class="ttname"><a href="structdrv__hts221__twi__cfg__t.html#a8c7253a73c43f1c2208390e53694d672">drv_hts221_twi_cfg_t::twi_addr</a></div><div class="ttdeci">uint8_t twi_addr</div><div class="ttdoc">TWI address on bus. </div><div class="ttdef"><b>Definition:</b> drv_hts221.h:212</div></div>
<div class="ttc" id="structdrv__hts221__twi__cfg__t_html_a6c34d8d908539157fb1bf9c8a9c7da70"><div class="ttname"><a href="structdrv__hts221__twi__cfg__t.html#a6c34d8d908539157fb1bf9c8a9c7da70">drv_hts221_twi_cfg_t::p_twi_config</a></div><div class="ttdeci">nrf_drv_twi_config_t const  * p_twi_config</div><div class="ttdoc">TWI configuraion. </div><div class="ttdef"><b>Definition:</b> drv_hts221.h:215</div></div>
<div class="ttc" id="structdrv__hts221__cfg__t_html"><div class="ttname"><a href="structdrv__hts221__cfg__t.html">drv_hts221_cfg_t</a></div><div class="ttdoc">Configuration struct for HTS221 humidity sensor. </div><div class="ttdef"><b>Definition:</b> drv_hts221.h:186</div></div>
<div class="ttc" id="group__hts221__humidity__driver_html_gacd7cb33e6115282cecdb0294c22de66b"><div class="ttname"><a href="group__hts221__humidity__driver.html#gacd7cb33e6115282cecdb0294c22de66b">drv_hts221_reboot</a></div><div class="ttdeci">uint32_t drv_hts221_reboot(void)</div><div class="ttdoc">Function for rebooting the HTS221 memory content. </div></div>
<div class="ttc" id="structdrv__hts221__calib__t_html"><div class="ttname"><a href="structdrv__hts221__calib__t.html">drv_hts221_calib_t</a></div><div class="ttdoc">Calibration struct. </div><div class="ttdef"><b>Definition:</b> drv_hts221.h:196</div></div>
<div class="ttc" id="group__hts221__humidity__driver_html_gad12bb488d720d11e8a7b77d67428911d"><div class="ttname"><a href="group__hts221__humidity__driver.html#gad12bb488d720d11e8a7b77d67428911d">drv_hts221_humidity_get</a></div><div class="ttdeci">uint32_t drv_hts221_humidity_get(int16_t *p_humidity)</div><div class="ttdoc">Function for getting the humidity data. </div></div>
<div class="ttc" id="group__hts221__humidity__driver_html_gaf262aca57c55b678c961d61f548f1e80"><div class="ttname"><a href="group__hts221__humidity__driver.html#gaf262aca57c55b678c961d61f548f1e80">drv_hts221_close</a></div><div class="ttdeci">uint32_t drv_hts221_close(void)</div><div class="ttdoc">Function for closing the HTS221 driver. </div></div>
<div class="ttc" id="group__hts221__humidity__driver_html_gaa2b19972c9fcb84123011a191849af58"><div class="ttname"><a href="group__hts221__humidity__driver.html#gaa2b19972c9fcb84123011a191849af58">drv_hts221_init</a></div><div class="ttdeci">uint32_t drv_hts221_init(void)</div><div class="ttdoc">Function for initializing the HTS221 driver. </div></div>
<div class="ttc" id="group__hts221__humidity__driver_html_ga9e887a67ff3bdc5b98cbe63c7ed06272"><div class="ttname"><a href="group__hts221__humidity__driver.html#ga9e887a67ff3bdc5b98cbe63c7ed06272">drv_hts221_verify</a></div><div class="ttdeci">uint32_t drv_hts221_verify(void)</div><div class="ttdoc">Function for verifying the HTS221 WHO_AM_I register. </div></div>
<div class="ttc" id="structdrv__hts221__twi__cfg__t_html"><div class="ttname"><a href="structdrv__hts221__twi__cfg__t.html">drv_hts221_twi_cfg_t</a></div><div class="ttdoc">Initialization struct for the humidity driver. </div><div class="ttdef"><b>Definition:</b> drv_hts221.h:210</div></div>
<div class="ttc" id="structdrv__hts221__twi__cfg__t_html_aad2f34fbc23f1707a2a924ad692052eb"><div class="ttname"><a href="structdrv__hts221__twi__cfg__t.html#aad2f34fbc23f1707a2a924ad692052eb">drv_hts221_twi_cfg_t::p_twi_instance</a></div><div class="ttdeci">nrf_drv_twi_t const  * p_twi_instance</div><div class="ttdoc">TWI instance. </div><div class="ttdef"><b>Definition:</b> drv_hts221.h:214</div></div>
<div class="ttc" id="group__hts221__humidity__driver_html_gab3a1f7d2ec8dbfa30e72b0ab4477521a"><div class="ttname"><a href="group__hts221__humidity__driver.html#gab3a1f7d2ec8dbfa30e72b0ab4477521a">drv_hts221_status_get</a></div><div class="ttdeci">uint32_t drv_hts221_status_get(uint8_t *p_status)</div><div class="ttdoc">Function for getting the status. </div></div>
<div class="ttc" id="group__hts221__humidity__driver_html_gac83d1b720213d6cdd3313d78a96f4b85"><div class="ttname"><a href="group__hts221__humidity__driver.html#gac83d1b720213d6cdd3313d78a96f4b85">drv_hts221_temperature_get</a></div><div class="ttdeci">uint32_t drv_hts221_temperature_get(int16_t *p_temperature)</div><div class="ttdoc">Function for getting the temperature data. </div></div>
<div class="ttc" id="group__hts221__humidity__driver_html_gaf996ef2e602624d1f203c8ab0bd549b8"><div class="ttname"><a href="group__hts221__humidity__driver.html#gaf996ef2e602624d1f203c8ab0bd549b8">drv_hts221_one_shot</a></div><div class="ttdeci">uint32_t drv_hts221_one_shot(void)</div><div class="ttdoc">Function for starting one shot conversion. </div></div>
<div class="ttc" id="group__hts221__humidity__driver_html_ga8f62f93e4ed7e7ede87f8ef902f2e125"><div class="ttname"><a href="group__hts221__humidity__driver.html#ga8f62f93e4ed7e7ede87f8ef902f2e125">drv_hts221_calib_get</a></div><div class="ttdeci">uint32_t drv_hts221_calib_get(drv_hts221_calib_t *p_calib)</div><div class="ttdoc">Function for getting the sensor calibration data. </div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="topicfooter">
<a href="mailto:docfeedback@nordicsemi.no?subject=Documentation%20feedback" id="maillink">Documentation feedback</a> | <a href="https://devzone.nordicsemi.com/questions/" target="_blank">Developer Zone</a> | <a href="http://response.nordicsemi.com/subscribe-to-our-newsletters" target="_blank">Subscribe</a> | Updated <span id="date"/>
<script>
var date = new Date("Thu Feb 7 2019" + " UTC");
document.getElementById("date").innerHTML = date.toJSON().slice(0, 10);
var url=window.location.href.split("?")[0];
var filename=url.substring(url.lastIndexOf('/')+1);
document.getElementById("maillink").href = "mailto:docfeedback@nordicsemi.no?subject=Documentation%20feedback"+decodeURIComponent("%26")+"body=File%20name%3A%20"+encodeURIComponent(filename);
</script>
</div>
</body>
</html>
